import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from '../components/Main.vue'

import Home from '../components/Home.vue'
import Monkeyking from '../components/Monkeyking.vue'
import Shop from '../components/Shop.vue'
import Artist from '../components/Artist.vue'


import Back from '../components/parts/Back.vue'
import Eyes from '../components/parts/Eyes.vue'
import GoldRing from '../components/parts/GoldRing.vue'
import Head from '../components/parts/Head.vue'
import Ear from '../components/parts/Ear.vue'
import Nose from '../components/parts/Nose.vue'
import Mouth from '../components/parts/Mouth.vue'
import Beard from '../components/parts/Beard.vue'

Vue.use(VueRouter)

export default new VueRouter({
	mode:"history",
	routes: [
		{ path: '/', component: Main, redirect:'/home', children:[
			{ path: '/home', component: Home},
			{ path: '/monkeyking', component: Monkeyking,redirect:'/monkeyking/back', children:[
				// 动态路由，路径要写全。
				// { path: '/shop/:id', component: Back},
				{ path: 'back', component: Back},
				{ path: 'eyes', component: Eyes},
				{ path: 'goldring', component: GoldRing},
				{ path: 'head', component: Head},
				{ path: 'ear', component: Ear},
				{ path: 'nose', component: Nose},
				{ path: 'mouth', component: Mouth},
				{ path: 'beard', component: Beard}
			]},
			{ path: '/shop', component: Shop,redirect:'/shop/back', children:[
				// 动态路由，路径要写全。
				// { path: '/shop/:id', component: Back},
				{ path: 'back', component: Back},
				{ path: 'eyes', component: Eyes},
				{ path: 'goldring', component: GoldRing},
				{ path: 'head', component: Head},
				{ path: 'ear', component: Ear},
				{ path: 'nose', component: Nose},
				{ path: 'mouth', component: Mouth},
				{ path: 'beard', component: Beard}
			]},
			{ path: '/artist', component: Artist,redirect:'/artist/back',children:[
				{ path: 'back', component: Back},
				{ path: 'eyes', component: Eyes},
				{ path: 'goldring', component: GoldRing},
				{ path: 'head', component: Head},
				{ path: 'ear', component: Ear},
				{ path: 'nose', component: Nose},
				{ path: 'mouth', component: Mouth},
				{ path: 'beard', component: Beard}
			]},
		]},
	]
})




